package com.cxy.services;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cxy.dao.TalkDao;
import com.cxy.pojo.Talk;

@Service
@Transactional
public class TalkServices {
	@Resource
	private TalkDao talkDao;
	
	@Transactional(readOnly=true)
	public List<Talk> find(){
		return talkDao.findAll();
	}
	@Transactional(readOnly=true)
	public Talk get(int id){
		return talkDao.findById(id);
	}
	public void saveOrUpdate(Talk t){
		talkDao.saveOrUpdate(t);
	}
	public void del(int id){
		talkDao.del(id);
	}
	@Transactional(readOnly=true)
	public List<Talk> findByIssuesId(String issid){
		return talkDao.findByIssuesId(issid);
	}
}
